package com.dhcc.bpm.modules.metadata.vo;

import com.dhcc.bpm.modules.metadata.entity.ApiMetadata;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import org.springblade.core.tool.node.INode;

import java.util.ArrayList;
import java.util.List;

/**
 * 接口定义数据表视图实体类
 *
 * @author ccab
 * @since 2020-06-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ApiMetadataVO对象", description = "接口定义数据表")
public class ApiMetadataVO extends ApiMetadata implements INode {
	private static final long serialVersionUID = 1L;
	/**
	 * 主键ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
	/**
	 * 菜单编号
	 */
	private String no;

	/**
	 * 上级菜单编号
	 */
	private String parentNo;
	/**
	 * 父节点ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long parentId;

	/**
	 * 子孙节点
	 */
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	private List<INode> children;
	/**
	 * 获取
	 */
	@Override
	public List<INode> getChildren() {
		if (this.children == null) {
			this.children = new ArrayList<>();
		}
		return this.children;
	}

	/**
	 * openApi3.0文档内容
	 */
	private String yamlMsg;

	/**
	 * openApi3.0 json 内容
	 */
	private String jsonMsg;
	/**
	 * opc_policy_item对应的name
	 */
	private String itemName;
	/**
	 * 元素类型   1数据元素  2 复合元素
	 */
	private String elementType;

	/**
	 * 订阅元素查看
	 */
	private String orderEle;
	/**
	 * 渠道id
	 */
	private String appId;
	/**
	 * 是否选中
	 */
	private String isSelected;



}
